package servlet;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 雷世雄爸爸
 * Date: 2022-05-17
 * Time: 21:26
 */@WebServlet("/hello")
public class Helloworld extends HttpServlet {
     @Override
    protected void doGet(HttpServletRequest req , HttpServletResponse rsp) throws IOException {
        rsp.setCharacterEncoding("utf-8");
        rsp.setContentType("text/plain");
        rsp.getWriter().println("你好");
    }
}
